From 92d2e6796bdb08e00e51418a43fe12d7abb91238 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Wed, 17 May 2006 03:11:30 +0000 Subject: [PATCH] moved stack options to options/ --- xmldoc/filters/options/stack-append.xml | 6 +- xmldoc/filters/options/stack-copy.xml | 7 ++- xmldoc/filters/options/stack-depth.xml | 7 ++- xmldoc/filters/options/stack-discard.xml | 6 +- xmldoc/filters/options/stack-pop.xml | 10 +++- xmldoc/filters/options/stack-push.xml | 9 ++- xmldoc/filters/options/stack-replace.xml | 7 +++ xmldoc/filters/options/stack-swap.xml | 9 +++ xmldoc/filters/stack.xml | 75 +++++++----------------- 9 files changed, 77 insertions(+), 59 deletions(-) diff --git a/xmldoc/filters/options/stack-append.xml b/xmldoc/filters/options/stack-append.xml index 8b1378917..eb4299e05 100644 --- a/xmldoc/filters/options/stack-append.xml +++ b/xmldoc/filters/options/stack-append.xml @@ -1 +1,5 @@ - + +This option is only valid in conjunction with the . +When it is specified, the topmost collection of data from the stack is +appended to the current collection of data. + diff --git a/xmldoc/filters/options/stack-copy.xml b/xmldoc/filters/options/stack-copy.xml index 8b1378917..ae9fe8449 100644 --- a/xmldoc/filters/options/stack-copy.xml +++ b/xmldoc/filters/options/stack-copy.xml @@ -1 +1,6 @@ - + +This option is only valid when used with the option. +When this option is specified, a copy of the current state is pushed onto +the stack but the current state is left unchanged. Otherwise, the push +operation clears the current data collection. + diff --git a/xmldoc/filters/options/stack-depth.xml b/xmldoc/filters/options/stack-depth.xml index 8b1378917..2103d5d59 100644 --- a/xmldoc/filters/options/stack-depth.xml +++ b/xmldoc/filters/options/stack-depth.xml @@ -1 +1,6 @@ - + +This option is only valid when used along with the +option. If specified, it indicates which item on the stack should be +swapped with the current state. The default value is 1, which corresponds +to the top of the stack. + diff --git a/xmldoc/filters/options/stack-discard.xml b/xmldoc/filters/options/stack-discard.xml index 8b1378917..a4765b69d 100644 --- a/xmldoc/filters/options/stack-discard.xml +++ b/xmldoc/filters/options/stack-discard.xml @@ -1 +1,5 @@ - + +This option is only valid when used with the option. +When this option is specified, the popped state is discarded and the current +state remains unchanged. + diff --git a/xmldoc/filters/options/stack-pop.xml b/xmldoc/filters/options/stack-pop.xml index 8b1378917..0bfb71660 100644 --- a/xmldoc/filters/options/stack-pop.xml +++ b/xmldoc/filters/options/stack-pop.xml @@ -1 +1,9 @@ - + +This is one of three "primary" options to the stack filter. + + +This option "pops" the collection of data from the top of the stack. +By default, the saved state replaces the current state, but see the + and options for +alternatives. + diff --git a/xmldoc/filters/options/stack-push.xml b/xmldoc/filters/options/stack-push.xml index 8b1378917..8f76ad567 100644 --- a/xmldoc/filters/options/stack-push.xml +++ b/xmldoc/filters/options/stack-push.xml @@ -1 +1,8 @@ - + +This is one of three "primary" options to the stack filter. + + +When this option is specified, the current state is pushed onto the top of +the stack. By default, the current state is then cleared, but the + option can be used to cause it to be saved. + diff --git a/xmldoc/filters/options/stack-replace.xml b/xmldoc/filters/options/stack-replace.xml index 8b1378917..2e967fdba 100644 --- a/xmldoc/filters/options/stack-replace.xml +++ b/xmldoc/filters/options/stack-replace.xml @@ -1 +1,8 @@ + +This option is only valid when used with the option. +This is the default behavior of the option, so you +should never need to specify it, but it is included for the sake of +readability. When this option is specified, the popped state replaces +the current state. + diff --git a/xmldoc/filters/options/stack-swap.xml b/xmldoc/filters/options/stack-swap.xml index 8b1378917..b96874456 100644 --- a/xmldoc/filters/options/stack-swap.xml +++ b/xmldoc/filters/options/stack-swap.xml @@ -1 +1,10 @@ + +This is one of three "primary" options to the stack filter. + + +When this option is specified, the current state is swapped with a saved +state from the stack. By default, it is swapped with the top of the stack, +but the can be used to specify a different saved +state. + diff --git a/xmldoc/filters/stack.xml b/xmldoc/filters/stack.xml index 98c2b963f..45934ad15 100644 --- a/xmldoc/filters/stack.xml +++ b/xmldoc/filters/stack.xml @@ -1,55 +1,25 @@ - - - This filter is designed to solve advanced problems - that involve shuffling multiple lists of waypoints. It has - three distinct sets of suboptions: - PUSH - Pushes the current list of waypoints onto the stack. - If the 'copy' suboption is specified, a copy of the current - list is pushed onto the stack; otherwise, the current list is - cleared. - --x stack,push --x stack,push,copy - - POP - 'Pops' the top list of waypoints off of the stack. - What is done with that list depends on the suboption - specified. If the 'append' suboption is specified, the top - list of waypoints from the stack is added to the end of the - current list of waypoints. If the 'discard' option is - specified, the top list of waypoints is removed from the - stack and discarded, leaving the current list of waypoints - unchanged. If the 'replace' option is specified, or if no - option is specified, the top list of waypoints from the stack - replaces the current list of waypoints; the previous contents - of the current list are discarded. - --x stack,pop --x stack,pop,discard --x stack,pop,append - - SWAP - Swaps the current list of waypoints with a list from - the stack. If no further options are specified, the current - list is swapped with the top list on the stack. If the - 'depth' option is specified, it indicates which item on the - stack should be swapped. - --x stack,swap --x stack,swap,depth=2 - - The stack can be used in conjunction with other - filters to implement a "union" or "logical or" functionality. - The basic idea is to use the stack to store copies of the - original list of waypoints, then use the 'swap' function to - replace each copy with a filtered list. Finally, append all - of the filtered lists to create one big list, which is then - output. The following example finds a list of all points - that are either inside county A or inside county B. Any - points that are inside both counties are duplicated (but the - duplicates can be removed with the DUPLICATE filter; see - above.) + +This filter is designed to solve advanced problems that involve shuffling +multiple lists of waypoints, tracks, or routes. + + +The stack filter can be used to save the current state of the entire +collection of data. That state is placed on top of a stack of collections, +so you can simultaneously have as many stored collections of data as you +can fit in your computer's memory. + + + The stack filter can be used in conjunction with other + filters to implement a "union" or "logical or" functionality. + The basic idea is to use the stack to store copies of the + original list of waypoints, then use the 'swap' function to + replace each copy with a filtered list. Finally, append all + of the filtered lists to create one big list, which is then + output. The following example finds a list of all points + that are either inside county A or inside county B. Any + points that are inside both counties are duplicated (but the + duplicates can be removed with the DUPLICATE filter; see + above.) gpsbabel -i gpx -f in.gpx \ @@ -75,6 +45,5 @@ gpsbabel -i gpx -f indiana.gpx \ -o palmdoc,dbname=Indianapolis -F indianapolis.pdb \ -x stack,pop,append \ -o magellan -F fwaind.wpt - -- 2.30.2